import yunRequest from "./api"

const baseUrl = getApp().globalData.apiBaseUrl


// 获取建议分页数据
export function getAdvisePage(phone, page, pageSize, firstAddress, secondAddress, stateCode, timeType, address, key) {
    let url = baseUrl + "/advise/getAdvisePage"
    return yunRequest.post(url, {
        //用户手机号
        phone,
        //分页页数
        page,
        //页面大小
        pageSize,
        //一级管辖区
        firstAddress,
        //二级管辖区
        secondAddress,
        //状态代码(0待分配，1待处理，2驳回，3待审核，4已通过，5误报)
        stateCode,
        //时间类型(0:一天内,1:三天内,2:七天内,3:一月内,4:半年内)
        timeType,
        //辖区
        address,
        //问题关键字
        key
    })
}

// 获取催办建议数据
export function getUrgeAdvise(firstAddress, secondAddress, count, timeType, address, key) {
    let url = baseUrl + "/advise/getUrgeAdvise"
    return yunRequest.post(url, {
        //一级管辖区
        firstAddress,
        //二级管辖区
        secondAddress,
        //催办次数
        count,
        //时间类型(0:一天内,1:三天内,2:七天内,3:一月内,4:半年内)
        timeType,
        //辖区
        address,
        //问题关键字
        key
    })
  }
  
  // 催办
  export function urgeAdvise(adviseList) {
    let url = baseUrl + "/advise/urgeAdvise"
    return yunRequest.post(url, adviseList)
  }
  